<?php

use Illuminate\Routing\Router;

Admin::registerHelpersRoutes();
use Illuminate\Support\Facades\Input;

Route::group([
    'prefix'        => config('admin.prefix'),
    'namespace'     => Admin::controllerNamespace(),
    'middleware'    => ['web', 'admin'],
], function (Router $router) {

    $router->get('/', function(){
        return redirect(route('order.index'));
    });
    $router->resource('/product', 'ProductController');
    $router->resource('/productImage', 'ProductImageController');
    $router->resource('/order', 'OrderController');
    $router->resource('/feedback', 'FeedbackController');
    $router->resource('/share', 'ShareController');
    $router->resource('/userProduct', 'UserProductController');
    $router->any('/userCash/success', 'UserCashController@success')->name('admin.userCash.success');
    $router->resource('/userCash', 'UserCashController');

});


